# mathematical functions

# return only positive values, cut negative one.
onlypos <- function(x) {
  return (0.5* (x+abs(x)))
}

# http://en.wikipedia.org/wiki/Gompertz_curve
gompertz <- function(x, a=1, b=-1, c=-2) {
  return (a*exp(b*exp(1)^(c*x)))
}